home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / c / dice-3.16.lha / doc / dcc.doc < prev    next >
Text File  |  1994-02-13  |  33KB  |  843 lines

  1.  
  2. dcc/dcc                                 dcc/dcc
  3.  
  4.                 DCC.DOC
  5.  
  6.                   Matthew Dillon
  7.                   891 Regal Rd.
  8.                   Berkeley, Ca. 94708
  9.                   USA
  10.  
  11.                   dillon@overload.Berkeley.CA.US        --or--
  12.                   uunet.uu.net!overload!dillon
  13.  
  14.                   BIX: mdillon
  15.  
  16.     DCC <options and files>
  17.  
  18.     NOTE:   new this version, use of single precision IEEE libraries for
  19.     floating point.   Please read the note under the option '-ffp' for
  20.     more information.
  21.  
  22.     DCC is similar to the UNIX 'cc' command and is the frontend for the
  23.     DICE compiler.  For best performance I strongly suggest that you make
  24.     DCC, DC1, DCPP, DAS, and DLINK resident.  If you do not have enough
  25.     memory to do so you at least want to leave the largest programs, DC1
  26.     and DAS resident.    It is suggested that your machine have at least 1MB
  27.     of memory.    A compile or link can take as much as 400K of run-time
  28.     memory.
  29.  
  30.     Options may occur anywhere on the command line but MUST occur singly.
  31.     That is, -c -a instead of -ca.  file arguments to options may occur
  32.     with or without an intervening space.  -oFILE and -o FILE are both legal.
  33.  
  34.     Files ending in .a[sm] are assumed to be assembly files.  Files ending
  35.     in .l[ib] are assumed to be library files.    Files ending in .o[bj] are
  36.     assumed to be object files.  All other files are assumed to be C source
  37.     files.
  38.  
  39.     Normally DCC compiles all C source files, assembles all .a[sm] files,
  40.     and links the resulting object files with any specified .o files
  41.     together to produce an executable.    The output file may optionally be
  42.     specified with the -o option.  If not specified, a default output
  43.     filename based on the name of the input file is generated.    This
  44.     general action is modified by two options:
  45.  
  46.     -c    DCC does NOT link, -o specifies the output object file
  47.  
  48.     -a    DCC does NOT assemble (i.e. leaves the .a file resulting from
  49.         a compile).  -o specifies the output assembly file
  50.  
  51.     If neither option is given -o specifies the name of the resulting
  52.     executable.
  53.  
  54.     The default object directory is T: and may be changed with the -O option.
  55.     The default temporary directory is also T: and may be changed with the -T
  56.     option.  IF YOU HAVE LIMITED MEMORY you may have to specify that
  57.     temporary files not be placed in T: either by re-assigning T: or using
  58.     the -T option.  DICE goes much slower if temporary files must be written
  59.     to a floppy or even a hard disk.
  60.  
  61.     WARNING: .a[sm] files are assembled with DAS, read DAS.DOC if you
  62.     intend to assemble non-DC1 generated assembly.
  63.  
  64.         ------------------- OPTIONS ------------------
  65.  
  66.     file    File to compile, assemble (.a), and/or link (.o, .lib)
  67.  
  68.     @file    File containing further list of files, one per line.
  69.         (blank lines and lines beginning with ';' or '#' are
  70.         ignored.  File may NOT contain further options).
  71.  
  72.     -E file    specify stderr file, any errors are appended to the file
  73.         instead of to stdout.  Useful for batch compiles
  74.  
  75.     -c        Compile C source files and assemble into OBJECT files
  76.         only (do not link).
  77.  
  78.     -a        Compile C source files into ASSEMBLY files (do not assemble
  79.         or link).
  80.  
  81.         Keep in mind the DAS will do further optimizations on the
  82.         assembly file that you see.
  83.  
  84.     -l0     Do not link default libraries (dlib:c.lib dlib:amigas.lib
  85.         dlib:auto.lib), or standard startup (dlib:c.o and
  86.         dlib:x.o).
  87.  
  88.         BEGINNER'S NOTE:    Do not use this option
  89.  
  90.         This option is used in special circumstances, such as when
  91.         generating .libraries or .devices.
  92.  
  93.         WARNING: DICE is much more dependant on its startup code
  94.         (c.o and x.o) than other compilers, do not link without
  95.         the startup unless you know what you are doing.
  96.  
  97.     -l lib    When linking include this library. (space is optional)
  98.  
  99.         Generally -l is used to include the math library (-lm)
  100.         when formatted floating point *printf()s are required.
  101.  
  102.         Refer to the section 'MODELS AND LIBRARIES' and 'CREATING
  103.         YOUR OWN LIBRARIES' below for more information on linking
  104.         in custom libraries.
  105.  
  106.     -2.0    Default amiga.lib is    dlib:amigas20.lib
  107.         Default amiga include path is dinclude:amiga20/
  108.  
  109.         -2.x where 'x' is the second digit replacing the '0' in the
  110.         above example.    This option is useful when compiling for
  111.         different versions of the operating system.
  112.  
  113.     -1.3    Like -2.0, but using dlib:amigas13.lib and dinclude:amiga13/
  114.  
  115.         Again, -1.x may be specified.
  116.  
  117.     -L0     remove default library search path, including all explicitly
  118.         specified (-L dir) directories up to this point.
  119.  
  120.     -L dir    add the specified directory to the library search path.  If
  121.         the object module or library can not be found in the
  122.         current directory, directories specified with -L are
  123.         searched.  -L directories are searched before the default
  124.         library directory (DLIB:), assuming it was not removed
  125.         with -L0 .
  126.  
  127.         Note that the directory path specified by -L is used to
  128.         search for libraries AND object modules.
  129.  
  130.         A trailing '/' is optional
  131.  
  132.     -I0     remove default include path from search list.  The default
  133.         include path is dinclude: and dinclude:amiga/ (unless
  134.         modified by -1.x and -2.x options)
  135.  
  136.     -I dir    When compiling scan this include directory (space is
  137.         optional) The specified path takes precedence over defaults
  138.         but defaults are NOT removed.
  139.  
  140.     -D define[=value]
  141.         Pre-define a symbol
  142.  
  143.     -U        undefine __STDC__, mc68000, _DCC, and AMIGA.
  144.  
  145.     BEGINNER'S NOTE:    Do not use any of these options
  146.  
  147.     -H<outfile>=<hdrfile>
  148.  
  149.     This option enables precompiled header file generation and
  150.     operation. You may specify any number of -H options.  Example
  151.     usage:
  152.  
  153.     -Ht:defs.m=defs.h
  154.  
  155.     When DICE encounters an #include <defs.h> this will cause it to
  156.     first check for the existance of T:DEFS.M ... if T:DEFS.M does
  157.     not exist DICE will generate it from <defs.h>.    if T:DEFS.M
  158.     does exist then DICE will use it directly and ignore <defs.h>
  159.  
  160.     You must specify the -H option both to have DICE create the
  161.     precompiled header file and to have DICE use the precompiled
  162.     header file.  Normally one makes operation as transparent as
  163.     possible so as not depend on the option existing when porting
  164.     to other enviroments.
  165.  
  166.     WARNING WARNING WILL ROBINSON!    A precompiled header file contains
  167.     the preprocessed header and preprocessor macros.  These are set in
  168.     stone!    If you modify a #define that would normally effect
  169.     preprocessing of a header file which is precompiled THE EFFECT WILL
  170.     NOT OCCUR.  It is strongly suggested you use precompiled headers
  171.     ONLY with includes that are pretty much unchanging.  For example,
  172.     the commodore includes or otherwise have an appropriate dependancy
  173.     in your DMakefile or make script to delete the precompiled header
  174.     file whenever any of your headers are modified.
  175.  
  176.     Normally one has a single -H option that enables precompiling of a
  177.     local header file, say DEFS.H, which contains #include's of all
  178.     other header files.  Source modules would then #include <defs.h>
  179.  
  180.     BEGINNERS'S NOTE:   Do not use this option
  181.  
  182.     -o file    Specify output executable, object, or assembly file name
  183.         depending on what you are producing.  The space is optional
  184.  
  185.     -020    generate code for the 68020 and later microprocessors
  186.     -030    generate code for the 68030 and later microprocessors
  187.     -881    generate inline FFP code for the 68881
  188.     -882    generate inline FFP code for the 68882
  189.  
  190.     BEGINNER'S NOTE:    Do not use any of these options
  191.  
  192.     These options exist to produce 020 and 030 opcodes, and 881/882
  193.     inline assembly for floating point operations.    They are not
  194.     necessarily implemented yet.  The intent is to implement them
  195.     by V2.06 .
  196.  
  197.     -md     small data model (default)      uses A4-relative
  198.     -mD     large data model        uses absolute-long
  199.     -mc     small code model (default)      uses PC-relative
  200.     -mC     large code model        uses absolute-long
  201.  
  202.     BEGINNER'S NOTE:    Use only -mD if you declare more than
  203.     64KBytes of data.
  204.  
  205.     These options specify the default data and code model to use.
  206.     The model may be overriden by use of the __near and __far
  207.     type qualifiers (see EXTENSIONS.DOC) on a variable by variable
  208.     basis.
  209.  
  210.     DICE defaults to the small data and small code model, and is able
  211.     to generate >32KBytes of code using the small code model so you
  212.     should never have to use -mC.  Note tha